﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Metodesa.Master" AutoEventWireup="true" CodeBehind="ListCliente.aspx.cs" Inherits="Metodesa.Views.Home.ListCliente" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
      
    <asp:TextBox ID="searchbox" runat="server"></asp:TextBox>
    
  
      &nbsp;<asp:Button ID="FindButton" runat="server" Text="Buscar" 
        PostBackUrl="~/Views/Home/ListCliente.aspx?" CausesValidation="False" 
        onclick="FindButton_Click" />
      &nbsp;&nbsp;&nbsp;&nbsp;<asp:Button ID="PrepareAddButton" runat="server" Text="Agregar" 
        PostBackUrl="~/Views/Home/ListCliente.aspx?a=p" CausesValidation="False" 
        onclick="PrepareAddButton_Click"/>
     <asp:RadioButtonList ID="option" runat="server">
        <asp:ListItem Value="Ci">Cédula</asp:ListItem>
        <asp:ListItem Value="Name">Nombre</asp:ListItem>
        <asp:ListItem Value="LastName">Apellido</asp:ListItem>
        
    </asp:RadioButtonList>
    
    <div>
    <asp:Panel ID="ListClientes" runat="server" Visible="False">
     <p>&nbsp;</p>
  
    </asp:Panel>
    </div>
    
    <br />
    
    <asp:Label ID="label" runat="server" Text="Label" Visible="False"></asp:Label>
    <asp:Panel ID="PanelEditCliente" runat="server" Visible="False">
    <p>&nbsp;</p>
        <table style="width:481px;">
            
      
                <tr>
                    <td style="width: 24px">
                        Id</td>
                    <td style="width: 90px">
                        Nombre <font color="red">*</font></td>
                    <td style="width: 90px">
                        Apellido <font color="red">*</font></td>
                    <td style="width: 90px">
                        Cédula <font color="red">*</font></td>
                    <td style="width: 90px">
                        Dirección</td>
                </tr>
                <tr>
                    <td style="width: 24px">
                        <asp:Label ID="teId" runat="server" Font-Bold="True"></asp:Label>
                    </td>
                    <td style="width: 87px">
                        <asp:TextBox ID="teName" runat="server" Width="87px"></asp:TextBox>
                        <asp:RequiredFieldValidator id="RequiredFieldNombre1" runat="server" 
                            ControlToValidate="teName" Display="Dynamic"></asp:RequiredFieldValidator>
                    </td>
                    <td style="width: 87px">
                        <asp:TextBox ID="teLastName" runat="server" Width="87px"></asp:TextBox>
                        <asp:RequiredFieldValidator id="RequiredFieldApellido1" runat="server"  
                            ControlToValidate="teLastName" Display="Dynamic"></asp:RequiredFieldValidator>
                    </td>
                    <td style="width: 87px">
                        <asp:TextBox ID="teCi" runat="server" Width="87px"></asp:TextBox>
                        <asp:RequiredFieldValidator id="RequiredFieldCedula1" runat="server" 
                            ControlToValidate="teCi" Display="Dynamic"></asp:RequiredFieldValidator>
                        <br />
                        <asp:RegularExpressionValidator ID="ValidatorCedula1" runat="server" 
                            ControlToValidate="teCi" Display="Dynamic"></asp:RegularExpressionValidator>
                    </td>
                    <td>
                        <asp:TextBox ID="teAddress" runat="server" Height="49px" TextMode="MultiLine" 
                            Width="181px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td align="center" colspan="2">
                        <asp:Button ID="EditButton" runat="server" 
                        Text="Modificar" PostBackUrl="~/Views/Home/ListCliente.aspx?a=e" 
                        onclick="EditButton_Click" />
                    </td>
                </tr>
            
           
        </table>
     
  
    </asp:Panel>
    <asp:Panel ID="PanelAddCliente" runat="server" Visible="False">
    <p>&nbsp;</p>
    <table style="width:481px;">
            <tr>
                <td style="width: 90px">
                    Nombre <font color="red">*</font></td>
                <td style="width: 90px">
                    Apellido <font color="red">*</font></td>
                <td style="width: 90px">
                    Cédula <font color="red">*</font></td>
                <td style="width: 90px">
                    Dirección</td>
                
            </tr>
            <tr>
                <td style="width: 87px">
                    <asp:TextBox ID="taName" runat="server"  Width="87px"></asp:TextBox>
                    <asp:RequiredFieldValidator id="RequiredFieldNombre2" runat="server"  
                        ControlToValidate="taName" Display="Dynamic"></asp:RequiredFieldValidator>
                </td>
                <td style="width: 87px">
                    <asp:TextBox ID="taLastName" runat="server" Width="87px" ></asp:TextBox>
                    <asp:RequiredFieldValidator id="RequiredFieldApellido2" runat="server"  
                        ControlToValidate="taLastName" Display="Dynamic"></asp:RequiredFieldValidator>
                </td>
                <td style="width: 87px">
                    <asp:TextBox ID="taCi" runat="server" Width="87px"></asp:TextBox>
                    <asp:RequiredFieldValidator id="RequiredFieldCedula2" runat="server"  
                        ControlToValidate="taCi" Display="Dynamic"></asp:RequiredFieldValidator>
                    <br />
                        <asp:RegularExpressionValidator ID="ValidatorCedula2" runat="server" 
                        ControlToValidate="taCi" Display="Dynamic"></asp:RegularExpressionValidator>
                    
                </td>
               
                <td>
                    <asp:TextBox ID="taAddress" runat="server" TextMode="MultiLine" Width="181px" 
                        Height="49px"></asp:TextBox>
                </td>
                
                
            </tr>
            <tr>
                <td colspan="2" align="center">
                    <asp:Button ID="AddButton" runat="server" 
                        Text="Agregar" PostBackUrl="~/Views/Home/ListCliente.aspx?a=a" 
                        onclick="AddButton_Click" />
                </td>
                </tr>
           
        </table>
     
  
    </asp:Panel>
</asp:Content>
